package com.afterglow.lcsrpc.springboot.starter.anno;

import com.afterglow.lcsrpc.springboot.starter.bootstarp.RpcConsumerBootStrap;
import com.afterglow.lcsrpc.springboot.starter.bootstarp.RpcInitBootstrap;
import com.afterglow.lcsrpc.springboot.starter.bootstarp.RpcProviderBootStrap;
import org.springframework.context.annotation.Import;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Description:启用 Rpc 注解
 * Date: 2025/01/12
 * author: lcs
 */
@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Import({RpcInitBootstrap.class, RpcProviderBootStrap.class, RpcConsumerBootStrap.class})
public @interface EnableRpc {

    /**
     * 需要启动 server
     *
     * @return
     */
    boolean needServer() default true;
}
